package hczc.longcai.com.hccrowdfunding.home.first_index.fragments;

import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;

import hczc.longcai.com.hccrowdfunding.R;
import hczc.longcai.com.hccrowdfunding.application.BaseApplication;
import hczc.longcai.com.hccrowdfunding.home.second_invest.activities.ProjectDetailsActivity;

/**
 * 首页跑马灯的Fragment
 */
public class InformFragment extends Fragment implements View.OnClickListener {


    private ImageView horn;

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_inform,container,false);
        BaseApplication.scaleScreenHelper.loadView(((ViewGroup) view));

        initViews(view);

        return view;
    }

    private void initViews(View view) {
        horn = ((ImageView) view.findViewById(R.id.index_inform_pic));
        view.findViewById(R.id.index_inform).setOnClickListener(this);
    }


    @Override
    public void onClick(View v) {
        int id = v.getId();
        switch (id){
            case R.id.index_inform:
                startActivity(new Intent(getActivity(), ProjectDetailsActivity.class));
                break;
        }
    }
}
